package com.ss.controller;

import com.ss.config.DataSourceContextHolder;
import com.ss.service.UserService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;
import java.util.Map;

/**
 * Created by pure on 2018-05-08.
 */
@Controller
@RequestMapping("/user")
public class UserController {

    @Autowired
    private UserService userService;

    @RequestMapping(value = "/getDb1AllUser")
    @ResponseBody
    public List<Map> getDb1AllUser() {
        List<Map> list = userService.getAllUser1();
        return list;
    }

    @RequestMapping(value = "/getDb2AllUser")
    @ResponseBody
    public List<Map> getDb2AllUser() {
        List<Map> list = userService.getAllUser2();
        return list;
    }


}
